package com.leyou.search.service;

import com.leyou.search.dto.SearchParamDTO;
import com.leyou.search.entity.Goods;
import com.leyou.starter.elastic.entity.PageInfo;
import reactor.core.publisher.Mono;

import java.util.List;
import java.util.Map;

public interface SearchService {
    void createIndexAndMapping();
    void loadData();

    Mono<List<String>> getSuggestion(String key);

    Mono<PageInfo<Goods>> searchGoods(SearchParamDTO searchParamDTO);

    Mono<Map<String,List<?>>> getFilters(SearchParamDTO searchParamDTO);

    void saveGoodsById(Long spuId);

    void deleteGoodsById(Long spuId);
}
